package edu.uts.reekie.designer.implementation.model;



import edu.uts.reekie.designer.model.AbstractConnector;
import edu.uts.reekie.designer.model.ViewNode;

/*
 * 
 * TODO: expose directions as property sheet (combo box - see connections in shapes example)
 * TODO: add labels for decorations
 */
public class Connector extends AbstractConnector {
	
	public enum Style {
		Normal,
		ApiCall,
		Callback, 
		NetworkProtocol, 
		Signal 
	}
	
	
	public static final String PROPERTY_STYLE = "Style";
	public static final String PROPERTY_HAS_PORT = "HasPort";

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Connector() {
		style = Style.Normal;
	}
	
	
	public Connector(ViewNode source, ViewNode target) {
		super(source, target);
	}

	
	Style style;
	
	public Style getStyle() {
		return style;
	}
	
	public void setStyle(Style s){
		Style oldvalue = style;
		style = s;
		firePropertyChange(PROPERTY_STYLE, oldvalue, style);
	
	}
	
	boolean hasPort;
	
	public boolean hasPort() {
		return hasPort;
	}
	
	public void setHasPort(boolean newValue) {
		boolean oldvalue = hasPort;
		hasPort = newValue;
		firePropertyChange(PROPERTY_HAS_PORT, oldvalue, newValue);
		
	}
	
}
